﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Xf.MvcTag.UIExt.DataTables
{
    public interface IDataTablesQueryable<T>:IQueryable<T>
    {

    }
    public class DataTablesQueryable<T> : IDataTablesQueryable<T>
    {
        IQueryable<T> _queryable;
        DtRequest _request;
        public DataTablesQueryable(IQueryable<T> queryable, DtRequest request)
        {
            _queryable = queryable;
            _request = request;
        }

        public Type ElementType => typeof(T);

        public Expression Expression => _queryable.Expression;

        public IQueryProvider Provider => _queryable.Provider;

        public IEnumerator<T> GetEnumerator()
        {
            return _queryable.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return _queryable.GetEnumerator();
        }
    }
}
